package com.lc.YYGH.hosp.controller;


import com.lc.YYGH.common.result.Result;
import com.lc.YYGH.hosp.service.DepartmentService;
import com.lc.YYGH.vo.hosp.DepartmentVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("admin/hosp/department")
@CrossOrigin
@Api(tags="科室管理")
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;

    @ApiOperation(value="查询医院所有科室列表")
    @GetMapping("getDeptList/{hoscode}")
    public Result getDepList(@PathVariable String hoscode)
    {
        List<DepartmentVo> list=departmentService.findDepTree(hoscode);
        return Result.success(list);
    }
}
